			var myModule = function($, window, document, undefined) {
				
				/*判断是否ie8*/
				if(window.navigator.appName == "Microsoft Internet Explorer"
					&& 
					window.navigator.appVersion.substr(0,3) == "4.0"){
					alert("请升级浏览器版本");
					document.body.innerHTML = '<h1 style="margin-top:100px;text-align:center;">请升级浏览器版本</h1>';
				}
					
				var myModule = function(fn){};
				
				/*改变主题组件*/
				myModule.ChangeTheme = function(opt){		
					this.init(opt);
				};
				myModule.ChangeTheme.prototype={
					constructor:this,
					init:function(opt){
						this.ele = $(opt.id);
						this.url = opt.url;
						this.themeData = null;
						this.themeType = "default";
						if(localStorage.themeData && localStorage.themeType){
							this.themeData = JSON.parse(localStorage.themeData);
							this.setTheme("useLocalStorage");						
							this.creatHtml();	
						}else{
							this.getData();
						}
					},
					getData:function(){
						var obj = this;
						$.ajax({
							type:"get",
							url:obj.url,
							dataType:"json",
							async:true,
							success:function(data){
								localStorage.setItem("themeData",JSON.stringify(data));	
								localStorage.setItem("themeType",obj.themeType);
								obj.themeData = data;	
								obj.creatHtml.bind(obj)();	
							}
						});
					},
					creatHtml:function(){
						var obj = this;
						var themeData = obj.themeData;
						var html = '';
						for(var theme in themeData){
							html+='<div class="color-block" data-theme="'+theme+'"><div class="block-inner" style="background-color:'+themeData[theme].themeColor+'"></div></div>';
						}
						obj.ele.html(html);
						obj.ele.on("click",".color-block",{obj:obj},obj.getType);
						
					},
					getType:function(data){
						var obj = data.data.obj;
						obj.themeType = $(this).attr("data-theme");
						obj.setTheme();
						
					},
					setTheme:function(useLocalStorage){
						if(localStorage.themeType == this.themeType) return;
						var themeData = this.themeData;
						var themeType = useLocalStorage ? localStorage.themeType : this.themeType;
						var root = document.documentElement;
						for(var item in themeData[themeType]){
							root.style.setProperty(item,themeData[themeType][item]);
						}
						localStorage.setItem("themeType",themeType);
					}

				};
				
				/*加载首页事例模块*/
				myModule.getDemoList = function(opt){		
					var _this = this;
					_this.ele = $(opt.id);
					_this.url = opt.url;
					_this.getData();
				};
				myModule.getDemoList.prototype={
					constructor:this,
					getData:function(){
						var _this = this;
						$.ajax({
							type:"get",
							url:_this.url,
							dataType:"json",
							async:true,
							success:function(data){
								var html='';
								var length=0;
							    for(var module in data){
							    	html += '<div class="item"><h3>'+module+'</h3><div class="item-body clearfix">';
							    	length = data[module].length;
							    	var url = null,target = "";
							    	if(length){
							    		for(var i=0;i<length;i++){
											if(data[module][i].target && data[module][i].target=="_blank"){
												html += '<a href="'+data[module][i].url+'">'+data[module][i].name+'</a>';
											}
											html += '<a data-url="'+data[module][i].url+'">'+data[module][i].name+'</a>';
										}
							    	}else{
							    		html +='暂无数据';
							    	}
							    	html += '</div></div>';
							    }
							    _this.ele.html(html);
							}
						});	
					}
				};
				return myModule;
				
			}(jQuery,window,document);